package com.zmx.b2c.order.dto;

import com.zmx.common.common.dto.BaseDto;
import com.zmx.common.common.enums.Enum;
import lombok.Data;
import lombok.ToString;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author zhaomxr
 * null
 */
@Data
@ToString
public class B2COrderDto extends BaseDto {

    /**
     * 活动id
     */
    private Long activeId;

    /**
     * null
     */
    private Long memberId;

    /**
     * 父单号
     */
    private String parentSn;

    /**
     * 为系统为订单生成的唯一标识码，编码要求，包含日期，渠道；
     */
    private String orderSn;

    /**
     * 订单外部编号
     */
    private String outSn;

    /**
     * 配送单号
     */
    private String deliveryNo;

    /**
     * 订单状态 0未确认，1已确认，2已完成，3已取消，4取消中，5拒收，6拒收入库
     */
    private Integer orderStatus;

    /**
     * 支付状态 0未支付，1已支付，2已退款
     */
    private Integer paymentStatus;

    /**
     * 1:未配送 2：已配送
     */
    private Integer deliveryStatus;

    /**
     * 平台 0-自营
     */
    private Integer platform;

    /**
     * 来源 0-小程序
     */
    private String orderSource;

    /**
     * 用户名
     */
    private String consignee;

    /**
     * 电话
     */
    private String phone;

    /**
     * 地址
     */
    private String address;

    /**
     * null
     */
    private String area;

    /**
     * 支付总金额
     */
    private BigDecimal amountPaid;

    /**
     * 运费
     */
    private BigDecimal freight;

    /**
     * 订单金额
     */
    private BigDecimal totalPrice;

    /**
     * 买家留言
     */
    private String leaveWord;

    /**
     * null
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date ts;

    private String orderStatusStr;

    /**
     * 订单详情
     */
    private List<B2COrderItemDto> b2COrderItemDtos;

    public B2COrderDto() {
    }

    public B2COrderDto(Long activeId, Long memberId, String deliveryNo, Integer orderStatus, Integer paymentStatus, Integer deliveryStatus, Integer platform, String orderSource, String consignee, String phone, String address, String area, BigDecimal amountPaid, BigDecimal freight, BigDecimal totalPrice, String leaveWord) {
        this.activeId = activeId;
        this.memberId = memberId;
        this.deliveryNo = deliveryNo;
        this.orderStatus = orderStatus;
        this.paymentStatus = paymentStatus;
        this.deliveryStatus = deliveryStatus;
        this.platform = platform;
        this.orderSource = orderSource;
        this.consignee = consignee;
        this.phone = phone;
        this.address = address;
        this.area = area;
        this.amountPaid = amountPaid;
        this.freight = freight;
        this.totalPrice = totalPrice;
        this.leaveWord = leaveWord;
    }
}
